/**
 * @brief hot points to the parent node of target node.
 * if the target node is null, hot points to the leaf node.
 * if v is the target node, hot is NULL.
 * 
 * @tparam T 
 */
template <typename T>
static BinNodePosi(T)& searchIn(BinNodePosi(T) &v, const T &e, BinNodePosi(T) &hot) {
	if(!v || e == v->data) return v;

	/* record the current node */
	hot = v;
	return searchIn(((e < v->data) ? v->lc : v->rc), e, hot);
}

template <class T>
BinNodePosi(T) &BST<T>::search(const T &e) {
	/* return a reference for subsequent insert and delete operations */
	return searchIn(this->_root, e, _hot = NULL);
}